Skip to content

allowed response type of file#293

Closed
nickretallack wants to merge 1 commit into
OAI:masterfrom
nickretallack:master
Closed

allowed response type of file#293
nickretallack wants to merge 1 commit into
OAI:masterfrom
nickretallack:master

Conversation

@nickretallack

Copy link
Copy Markdown

Not sure if this is the best way to do it, but we should do something to support what the documentation says we do. Comments welcome.

Not sure how to "test" this or try it out in swagger-editor.

@webron

webron commented Mar 4, 2015

Copy link
Copy Markdown
Member

If you fix it (the responseSchema is defined inside schema by mistake) and resubmit it against the 2.0_fixes branches, I'd be more than happy to merge it.

@webron

webron commented Mar 4, 2015

Copy link
Copy Markdown
Member

Please note that I just pushed a few changes to the schema object in that branch, so make sure to pull those.

@ePaul

ePaul commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

If I understand right, when using "type": "file", there is no much point in including anything else in this schema definition. So maybe something like

"responseSchema": {
    "anyOf": [ {
            "$ref": "#/definitions/schema"
         }, {
            "type": "object"
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [ "file" ]
                }
            }
        }
    ]
}

would be shorter, easier maintainable and allow less nonsense? (I'm not an expert on JSON schema, I find the spec unreadable, and have no tools here to try if this works. I hope the intention is clear.)

@webron

webron commented Jul 30, 2015

Copy link
Copy Markdown
Member

Thanks, but due to code drift, had to implement it differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants